<?php

class Imagens_casesView extends Imagens_cases{
	
	public function listar($arr){
		$total = count($arr);
		for($i = 0;$i < $total;$i++){      	
			echo '<tr>';
				echo '<td width="10%"><img src="../imagens/cases/',$arr[$i]['imagem0'],'" width="100" /></td>';
				//echo '<td width="25%">',$arr[$i]['legenda'],'</td>';
				echo '<td width="25%">',$arr[$i]['titulo'],'</td>';
				echo '<td width="20%" align="center" onclick="javascript:editar(',$arr[$i]['idimagens_cases'],',\'imagens_cases\');" class="tabelaB"><img src="images/app-edit-icon.png" width="20" align="absmiddle" /> Editar</td>';
				echo '<td width="20%" id="editar" align="center" onclick="javascript:excluir(',$arr[$i]['idimagens_cases'],',\'Imagens_cases\');" class="tabelaB"><img src="images/app-delete-icon.png" width="20" align="absmiddle" /> Excluir</td>';
			echo '</tr>';
	    }
	}
	public function select($arr){
		$total = count($arr);
		echo '<option value = "0">Selecione</option>';
		for($i = 0;$i < $total;$i++){
			echo '<option value="',$arr[$i]['idimagens_cases'],'">',$arr[$i]['nome'],'</option>';
	    }
	}
	public function visualizar($arr){
		$total = count($arr);
		echo '<img id="bigPic" src="imagens/cases/',$arr[0]['imagem0'],'" width="520" >';
		
		echo '<div class="list_carousel_2">';
				echo '<div id="pager" class="pager"></div>';
				echo '<ul id="foo">';	
				for($i = 0;$i < $total;$i++){
					echo '<li title="',$arr[$i]['imagem0'],'">';
						echo '<img src="imagens/transparente.png" width="160" height="120" style="background:url(class/thumb.php?img=../imagens/cases/',$arr[$i]['imagem0'],'&w=250&h=250) no-repeat center;">';
					echo '</li>';
				}
			echo '
				</ul>
				<div class="clearfix"></div>
				<a id="prev" class="prev" href="#">&nbsp;</a>
				<a id="next" class="next" href="#">&nbsp;</a>			
		</div>';
	}
}
?>